package svc

import (
	"zhongxc.cc/mall-common/msdb"
	"zhongxc.cc/mall-product/internal/config"
	"zhongxc.cc/mall-product/internal/database"
)

type ServiceContext struct {
	Config config.Config
	Db     *msdb.MsDB
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		Db:     database.ConnMysql(c.Mysql.DataSource),
	}
}
